home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Sunday Times: The Month 2003 December
/
The Sunday Times - The Month 2003-12.iso
/
mac
/
The Month DEC 03
/
engine
/
modules
/
contents.swf
/
scripts
/
frame_1
/
DoAction.as
Wrap
Text File
|
2003-06-20
|
2KB
|
73 lines
function addLink(mc)
{
Links[mc.link] = mc;
}
function getMCfromLink(Item)
{
if(Links[Item] == null)
{
var arr = [];
while(Item != sideMenu.ItemHome)
{
arr.unshift(Item._name.split("_").pop());
Item = Item._parent._parent;
}
var str = arr.join("/");
Links[Item] = Links[str];
}
return Links[Item];
}
function init()
{
IMAGE_PATH = Tardis.ASSETS_FOLDER + "images/" + main.ActiveSection.id + "/";
loadImage(mc_top_image,nodeData.byName("image"),IMAGE_PATH,strPathPrefix);
strActiveColor = Tardis.Colors.getString(nodeData.attributes.color);
strDefaultColor = Tardis.Colors.getString("default");
mc_links.build();
delete mc_links.build;
}
function doOver(Item)
{
var obj = getMCfromLink(Item);
obj.gotoAndStop("over");
}
function doOut(Item)
{
var obj = getMCfromLink(Item);
obj.gotoAndStop("off");
}
function linkOver(mc)
{
mc.gotoAndStop("over");
Tardis.sideMenu.doOver(mc.link);
}
function linkOut(mc)
{
mc.gotoAndStop("off");
Tardis.sideMenu.doOut(mc.link);
}
function linkUp(mc)
{
Tardis.sideMenu.doUp(mc.link);
}
function loadImage(mc, node, path, pathprefix)
{
var strImg = node.getText();
if(node.attributes.path != null)
{
strImg = node.attributes.path + strImg;
}
else
{
strImg = path + strImg;
}
mc.loadMovie(pathprefix + strImg);
}
Links = {};
Tardis.sideMenu.EB.addListener(this);
this.onUnload = function()
{
this.onUnload = null;
Tardis.sideMenu.EB.removeListener(this);
};